﻿@model IEnumerable<WeberTimeTracker.Models.PeriodHours>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<script>
    $().ready(function () {
        $('#btn').click(function () {
            $.ajax({
                url: "/Pay/GetList",
                success: function (data) {
                    $('#list').html(data);
                }
            });
        });

        $('#Button1').click(function () {
            var Startdate = $('#StartDate').val();
            var Enddate = $('#EndDate').val();
            $.ajax({
                url: "/Pay/GetList",
                data: { sdate: Startdate, edate: Enddate },
                success: function (data) {
                    $('#list').html(data);
                }
            });
        });
    });
</script>

<h2>Index</h2>

Enter the start date and end date for the pay period!<br /><br />
<fieldset>
  
    Enter Start Date:
    <input id="StartDate" class ="datetype" type="text" />
    Enter End Date:
    <input id="EndDate" class ="datetype" type="text" />
    <input id="Button1" type="button" value="Refresh" />
</fieldset>

<div id ="list">

</div>



